<!DOCTYPE html>
<html lang="zh-CN">
<%- include('../public/meta', {title: '首页'}); %>
<body>
<%- include('../public/header', {nav: 'index', noteTypes: noteTypes}); %>
<div class="cl-cantainer container">
  <div class="row">
    <div class="col-md-9 cl-left">
      <% if (1 < 0) { %>
      <div class="recommend-index">
        <div class="recommend-top">
          <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
            <ol class="carousel-indicators">
              <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
              <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
              <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
            </ol>
            <div class="carousel-inner">
              <div class="carousel-item active">
                <img class="d-block w-100" data-src="/dblog/static/temporary-img/recommended.jpg" alt="First slide">
              </div>
              <div class="carousel-item">
                <img class="d-block w-100" data-src="/dblog/static/temporary-img/recommended.jpg" alt="Second slide">
              </div>
              <div class="carousel-item">
                <img class="d-block w-100" data-src="/dblog/static/temporary-img/recommended.jpg" alt="Third slide">
              </div>
            </div>
            <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
              <span class="carousel-control-prev-icon" aria-hidden="true"></span>
              <span class="sr-only">Previous</span>
            </a>
            <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
              <span class="carousel-control-next-icon" aria-hidden="true"></span>
              <span class="sr-only">Next</span>
            </a>
          </div>
        </div>
        <div class="recommend-bottom">
          <div class="recommend-item">
            <a href="calmlog-details.html"><img data-src="/dblog/static/temporary-img/recommended-left.jpg" class="img-fluid" alt=""></a>
          </div>
          <div class="recommend-item">
            <a href="calmlog-details.html"><img data-src="/dblog/static/temporary-img/recommended-right.jpg" class="img-fluid" alt=""></a>
          </div>
        </div>
      </div>
      <%} %>
      <% if (!notes.length) { %>
        <div class="block-empty" style="min-height:330px">
          <div><img data-src="/dblog/static/img/nodata.png" alt="" /></div>
        </div>
      <% } %>
      <% for(var i = 0; i < notes.length; i++) { %>
      <div class="cl-card">
        <div class="row">
          <div class="col-lg-3 col-md-4 col-sm-12 cl-card-image">
            <a href="/dblog/note/v/detail.html?id=<%=notes[i].id %>" target="_blank">
              <% if(notes[i].cover) { %>
              <img data-src="<%=notes[i].cover %>" class="img-fluid" alt="<%=notes[i].title %>">
              <% } else { %>
              <img data-src="/dblog/static/img/default-img.jpg" class="img-fluid" alt="<%=notes[i].title %>">
              <% } %>
            </a>
          </div>
          <div class="col-lg-9 col-md-8 col-sm-12 cl-card-main">
            <h3 class="cl-card-main-title">
              <a href="/dblog/note/v/detail.html?id=<%=notes[i].id %>" target="_blank"><%=notes[i].title %></a>
            </h3>
            <p class="cl-card-main-info"><%=notes[i].content %></p>
            <p class="cl-card-more">
              <span class="text-lightgray"><%=notes[i].createTime %></span>
              <a href="/dblog/note/v/detail.html?id=<%=notes[i].id %>" target="_blank">阅读更多...</a>
            </p>
          </div>
        </div>
      </div>
      <% } %>
    </div>
    <div class="col-md-3 cl-right">
      <%- include('../public/news', { data: news }); %>
      <%- include('../public/tags'); %>
      <%- include('../public/contact'); %>
    </div>
  </div>
</div>
<%- include('../public/footer'); %>
<%- include('../public/script-bottom'); %>
</body>
</html>